<template>
  <div>
    <Cart />
    <p>购物车数量：{{ count }}</p>
  </div>
</template>
<script>
import { toRefs} from 'vue'
import {useStore} from 'vuex'
import Cart from '../components/Cart.vue'
export default{
  name: 'Home',
  components:{
    Cart
  },
  setup(){
    const store = useStore()
    const state = store.state
    console.log(state)
    return {
      ...toRefs(state)
    }
  }
}
</script>